#!/bin/bash

if [ `whoami` != "root" ]; then
    echo "需要以root用户执行"
    exit -1;
fi

INSTALL_DIR=/usr/local/boot

systemctl stop boot.service

mkdir -p $INSTALL_DIR
chmod +x boot.sh
cp -af * $INSTALL_DIR

cp -af boot.service /lib/systemd/system/
systemctl enable boot.service
systemctl start boot.service

echo "安装完成"
